<!DOCTYPE html>
<html>
<head>
	<title>芭蕉花管理平台</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<link rel="SHORTCUT ICON" href="/img/favicon.ico">
	<script type="text/javascript">
		// 判断手机浏览
		var pathname = window.location.pathname;
		if (isMobile()) {
			if (pathname != "/mobile/home.html") {
				location.href = '/mobile/home.html';
			}
		} else {
			if (pathname != "/home.html") {
				location.href = '/home.html';
			}
		}
	
		function isMobile() {
			if (window.navigator.userAgent
					.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)) {
				return true; // 移动端
			} else {
				return false; // PC端
			}
		}
	</script>
	<link rel="stylesheet" type="text/css" href="/mobile/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="/mobile/css/font-awesome.min.css">
	<link rel="stylesheet" type="text/css" href="/mobile/css/bjhcom.css">
	<script type="text/javascript" src="/mobile/js/jquery.min.js"></script>
	<script type="text/javascript" src="/mobile/js/jquery.easing.js"></script>
	<script type="text/javascript" src="/mobile/js/popper.min.js"></script>
	<script type="text/javascript" src="/mobile/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="/mobile/js/bjhcom.js"></script>
	<style type="text/css">
		html {min-height: 100%}
		#wrapper {margin-top: .875rem; width: 100%; margin-bottom: 7rem;}
		.navbar {box-shadow: 0 0 5px #ccc;}
		.navbar .fixed-bottom {padding-top: 0;}
		.navbar .nav-menu-box {width: 100%}
		.navbar .navbar-collapse-more {width: 100%;}
		.navbar .navbar-collapse-more .nav-menu {padding-bottom: .5rem; border-bottom: 1px solid #ccc; margin-bottom: .5rem;}
		.navbar .navbar-collapse-more .nav-title {font-size: .875rem; color: #17a2b8; border-bottom: 1px solid #ccc; margin-bottom: .5rem;}
		ul.nav-menu {display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; padding: 0; margin: 0;}
		ul.nav-menu>li {color: #6c757d; position: relative; display: block; padding-top: 2rem; -webkit-box-flex: 1; -webkit-flex: 1 0 auto; -ms-flex: 1 0 auto; flex: 1 0 auto;}
		ul.nav-menu>li:active {color: #17a2b8;}
		ul.nav-menu>li>i {position: absolute; top: .25rem; left: 0; right: 0; display: block; text-align: center; line-height: 1rem; font-size: 1.75rem;}
		ul.nav-menu>li>span {display: block; text-align: center; font-size: .875rem; -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none;}
		.menu-footer {width: 100%; text-align: center;}
		.menu-footer .menu-logo {max-width: 20px; padding: 1px; -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none;}
		.menu-footer .menu-title {color: #aaa; font-size: 0.75rem; padding-left: 5px; -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none;}
	</style>
</head>
<body>
	<nav class="navbar fixed-bottom navbar-light bg-light">
		<div class="collapse navbar-collapse-more" id="navbarNavPullup">
			<div id="userBox">
				<div class="nav-title"></div>
				<ul class="nav-menu">
					<li class="nav-need-close-more" onclick="getHtml('/mobile/pages/admin/changePassword.html');return false;"><i class="fa fa-lock"></i><span>修改密码</span></li>
					<li class="nav-need-close-more" onclick="logout();return false;"><i class="fa fa-sign-out"></i><span>退出登录</span></li>
				</ul>
			</div>
		</div>
		<div class="nav-menu-box">
			<ul class="nav-menu">
				<li class="" onclick="getHtml('/mobile/pages/welcome.html');return false;"><i class="fa fa-home"></i><span>首页</span></li>
				<li class="" onclick="getHtml('/mobile/menu.html');return false;"><i class="fa fa-navicon"></i><span>菜单</span></li>
				<li class="navbar-more" data-toggle="collapse" data-target="#navbarNavPullup" aria-controls="navbarNavPullup" aria-expanded="false" aria-label="Toggle navigation"><i class="fa fa-ellipsis-h"></i><span>更多</span></li>
			</ul>
		</div>
		<div class="menu-footer">
			<img class="menu-logo" src="/mobile/img/logo.png"><span class="menu-title">芭蕉花管理平台</span>
		</div>
	</nav>
	<input type="hidden" id="htmlParams" value='' />

	<div id="wrapper">
	</div>
</body>
<script type="text/javascript">
	// 初始化
	$(function () {
		initSysInfo();
		initCopyright();

		$("nav .nav-need-close-more").click(function(){
			$("nav .navbar-more").click();
		});
	});

	//初始化账号信息
	function initSysInfo() {
		var url_getLoginInfo = "/sys/getLoginInfo";
		var params_getLoginInfo = {};
		getMapData(url_getLoginInfo, params_getLoginInfo, function(data, result) {
			if (result == "success") {
				var userInfo = data.userInfo;
				var text = userInfo.account;
				if (userInfo.nickName != null && userInfo.nickName != "") {
					text += "(" + userInfo.nickName + ")"
				}
				$("#userBox .nav-title").text(text);
			} else {
				location.href = '/login.html';
			}
		});
	}

	function initCopyright() {
		var url_adminSysInfo = "/sys/getAdminSysInfo";
		var params_adminSysInfo = {};
		getMapData(url_adminSysInfo, params_adminSysInfo, function(data, result) {
			if (result == "success") {
				var info = data.info;
				var copyright = "";
				for (var i = 0; i < info.length; i++) {
					if (info[i].keys == 'copyright') {
						copyright += info[i].value;
					}
				}
				var company = "";
				for (var i = 0; i < info.length; i++) {
					if (info[i].keys == 'company') {
						company += info[i].value;
					}
//					if (info[i].keys == 'logo') {
//						if (info[i].value) {
//							$("#logo").attr("src", info[i].value);
//						}
//					}
				}
				$("#copyright").text(copyright);
				$("#company").text(company);
			}
		});
	}

	function logout() {
		getHtml("/logout", null, null, true, false, false, function(data, result) {
			location.href = '/login.html';
		});
	}

	getHtml("/mobile/pages/welcome.html", null, null, false);
	
</script>
</html>